package com.rcloud.server.sealtalk.configuration;


import com.rcloud.server.sealtalk.interceptor.AliPayInterceptor;
import com.rcloud.server.sealtalk.interceptor.WebSocketInterceptor;
import com.rcloud.server.sealtalk.interceptor.WxPayInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class IJPayConfigurer implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new AliPayInterceptor()).addPathPatterns("/pay/aliPay/**");
        registry.addInterceptor(new WxPayInterceptor()).addPathPatterns("/pay/wxPay/**");
        registry.addInterceptor(new WebSocketInterceptor()).addPathPatterns("/v1/common/user/**");
    }
}
